<!--#include file="lib/utf-8.asp"-->
<!--#include file="lib/connopen.asp"-->
<!--#include file="lib/asp-common-lib.asp"-->
<%
if CheckEmployee() then
    id=clng(saferequest("id",1))
%>
<script type="text/javascript">
  $(function() {

    $(".res").cluetip({
      showTitle: false,
      //activation: 'click',
      clickThrough: false,
      onShow: function(ct, c){
        $("#cluetip").css({"width":"auto","max-width":"400px"});
      }
    });
  });
</script>
<table id="record" class="full res">
    <thead>
        <tr><th colspan="6" scope="col">报关单操作历史记录表</th></tr>
    </thead>
    <tbody>
        <tr>
        <th scope="col">操作时间</th>
        <th scope="col">操作人员</th>
        <th scope="col">操作内容</th>
        <th scope="col">操作详细</th>
        <th scope="col">操作人IP</th>
        <th scope="col">备注</th>
        </tr>
        <%
        Set rs_record = Server.CreateObject("ADODB.Recordset")
        if CheckEmployee() then 
            sql = "SELECT record.id,re_update,re_operate,clientip,re_memo,fullname,username.username FROM username inner join (record left join client on client.id=record.re_clientid) on username.id=record.username where re_table='cd' and re_id="&id&" order by re_update desc"
        else
            sql = "SELECT record.id,re_update,re_operate,clientip,re_memo,fullname,username.username FROM username inner join (record left join client on client.id=record.re_clientid) on username.id=record.username where wtr="&session("iWtr")&" and re_table='cd' and re_id="&id&" order by re_update desc"
        end if
        rs_record.Open sql,conn,1,1
        do while not rs_record.eof
        %>
        <tr>
            <th class="sub" scope="row"><%=rs_record("RE_UPDATE")%></th>
            <td><%=rs_record("FULLNAME")&"("&rs_record("username")&")"%></td>
            <th class="sub" scope="row"><%=rs_record("RE_OPERATE")%></th>
            <th class="sub" scope="row"><a class="res" href="<%=rs_record("id")%>" rel="res.asp?opt_id=<%=rs_record("id")%>">详细</a></th>
            <th class="sub" scope="row"><%=rs_record("CLIENTIP")%></th>
            <th class="sub" scope="row"><%=rs_record("RE_MEMO")%></th>
        </tr>
        <%
            rs_record.movenext
        loop
        rs_record.close
        set rs_record=nothing
        %>
    </tbody>
</table>
<%end if%>

<!--#include file="lib/connclose.asp"-->

